import top.pushtothe.Tree.Dir
import top.pushtothe.Tree.FileSys
import java.util.LinkedList
import top.pushtothe.Tree.TreeNode

fun main(args: Array<String>) {

//var d = Dir("abs/root")
//	println(d.absolutePath)
//	d.absolutePath = "nill/dicm"
//	println(d.absolutePath)
	
//	var d = Dir("/childPath")
//	println(d.absolutePath)
//	println(d.path)
//	println(d.getParentPath())
//	var dd = Dir()
//	println(dd.absolutePath)
//	println(dd.path)
	
//var root = TreeNode<String>("/")
//	println(root.countOfNodes())
	
	//get root path
	var path = "/"
	
	var rootNode = TreeNode(path)
	
	//relative path
	var childPath = "music/"
	var childNode = TreeNode(childPath)
	rootNode.addNode(childNode)
	//after added some nods the root node became the whole tree
	println("root count:${rootNode.countOfNodes()}")
	println("child count:${childNode.countOfNodes()}")
	var annoNode = TreeNode("dataStructure/")
	println("$childNode + == + ${rootNode.getChildren()}")
	
	rootNode.getChildAtIndex(0).addNode(annoNode)
	println("child count:${childNode.countOfNodes()}")
	
	var subPath = "video/"
	var video = childNode.addNodeReturn(TreeNode(subPath))
	println(video.data)
	var mp4 = video.addNodeReturn(TreeNode("Download/")).addNodeReturn(TreeNode("kotlin01.mp4"))
	println("count:${mp4.countOfNodes()}\n${mp4.data}")
//	println("root count:${rootNode.countOfNodes()}")
	
	
	
	
	
	
		
	
	
	
	
	
	
	

}